package bpel.instructions;

import java.util.LinkedList;

import bpel.BPELProcess;

/**
 * 
 * @author Maurice & Topia
 *
 */
public class BPELAssign extends BPELInstruction {
	private LinkedList<BPELInstruction> instructions;

	public BPELAssign() {
		instructions = new LinkedList<BPELInstruction>();
	}

	public void addInstruction(BPELInstruction instruction) {
		this.instructions.add(instruction);
	}

	@Override
	public String toString() {
		String assignStr = "";

		for (BPELInstruction instruction : instructions) {
			assignStr += instruction.toString() + "\n";
		}

		return assignStr;
	}

	@Override
	public String execute(BPELProcess process) {
		for(BPELInstruction i : instructions){
			i.execute(process);
		}
		
		return null;
	}
}
